import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import less from "less";
import axios from "axios";
import ElementUI from "element-ui";
import VueKonva from "vue-konva";
import animated from "animate.css";
import VueLazyload from "vue-lazyload";
import elementResizeDetectorMaker from "element-resize-detector";
import createstage from "@/utils/stage/createstage.js";
import datatools from "@/utils/datatools/index.js";
import "element-ui/lib/theme-chalk/index.css";
import "@/assets/styles/base.less";
import "@/utils/index.js";
import "@/assets/iconfont/iconfont.css";
import Directives from "@/directives/index.js";
// import 'default-passive-events';

Vue.prototype.$createstage = createstage;
Vue.prototype.$datatools = datatools;
Vue.prototype.$axios = axios;
axios.defaults.baseURL = "/api";
Vue.$httpRequestList = [] //终止请求

Vue.config.productionTip = false;

Vue.use(less);
Vue.use(animated);
Vue.use(ElementUI);
Vue.use(VueKonva);
Vue.use(Directives);
// Vue.use(lodash);
Vue.use(elementResizeDetectorMaker);

Vue.use(VueLazyload, {
  preLoad: 1.3, // 预压高度的比例
  error: "", // 图像的加载失败时 显示的error图标
  loading: "", // 图像正常加载时 显示的loading图标
  attempt: 1, // 图像尝试加载 次数
});

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
